home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-13 | 1.2 KB | 31 lines | [TEXT/GEOL] |
- Item 3418450 13-April-89 02:35
-
- From: UK0016 Icon Technology UK
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Locks are Dangerous!
-
- Locking handles/objects by whatever means is potentially dangerous.
-
- For example, what happens if an exception is signalled while one or more
- objects are locked? Who is responsible for ensuring that they are unlocked?
- Obviously the exception handlers, which must be able to identify the locked
- objects and their current lock state: this is dubious and messy.
-
- Objects that are locked, particularly for long periods of time, are liable to
- cause heap fragmentation problems.
-
- Careful coding methods should reduce the need for locks to an absolute minimum.
- Our policy is to make the use of locks illegal unless a watertight case can be
- made for using them: so far the only cases that we have found necessary in 900
- methods are to lock an object that contains text that is being passed by
- pointer to QD routines.
-
- That said, I feel I must agree with Paul Smith: if there is to be a locking
- mechanism in the release version of 2.0, then for goodness sake let it be a
- proper semaphore mechanism such as the one he proposes.
-
- Regards, Keith Lander
-
-